package jacker.bit.price;

import org.json.JSONArray;
import org.json.JSONObject;

import android.content.Context;

public class PlatformBtc100 implements Platform {

	@Override
	public String getCode() {
		return "btc100";
	}

	@Override
	public String getName(Context ctx) {
		return "BTC100";
	}

	@Override
	public float getPrice() throws Exception{
		String result = PriceChecker.httpGet("http://www.btc100.org/apidata/getdata.json");
		JSONArray json = new JSONArray(result);
		return Float.parseFloat(json.getJSONObject(0).getString("bit"));
	}

	@Override
	public String getCurrency() {
		// TODO Auto-generated method stub
		return "¥";
	}
	
	

}
